1
general::
To or in prison, as in They sent him up the river for five years. This phrase originally referred to Sing-Sing Prison, on the Hudson River about 30 miles north of New York City. So used from about 1890 on, it was broadened to apply to any prison by the early 1900s.
American Heritage Idioms
2
general::
Phrase(s): up the river
Sl. in prison. (Underworld.) • Gary was up the river for a couple of years, but that doesn’t make him an outcast, does it? • The judge who sent him up the river was indicted for accepting bribery. If Gary had only known sooner!
McGrawhill's American Idioms And Phrasal Verbs